import java.util.*;

public class RemoveDuplicationFromList {
    public static void main(String args[]) {
        List<Integer> inputList = Arrays.asList(1,1,2,3);
        HashSet hashSetInput = new HashSet();
        hashSetInput.addAll(inputList);

        List<Integer> outputList = new ArrayList<Integer>();
        outputList.addAll(hashSetInput);
        Set<Integer> tempHashSet = new HashSet();
        for (Integer integer : inputList) {
            if (!tempHashSet.add(integer)) {
                outputList.remove(integer);
            }
        }
        System.out.println(outputList);
    }
}
